import request from '../../utils/Request'

export const userLogin = data => {
    return request({
        method: 'post',
        url: '/api/platform/login',
        data: data
    })
}

export const userLogout = bId => {
    return request({
        method: 'get',
        url: '/api/platform/logout',
        params: {}
    })
}

export const getLoginUser = bId => {
    return request({
        method: 'get',
        url: '/api/platform/login/user',
        params: {}
    })
}

export const getKaptcha = bId => {
    return request({
        method: 'get',
        responseType: 'blob',
        url: '/api/platform/kaptcha/create/' + bId,
        params: {}
    })
}

export const updatePassword = data => {
    return request({
        method: "post",
        url: '/api/platform/updatePassword',
        data: data
    })
}

export const getPublicKey = account => {
    return request({
        method: "get",
        url: '/api/platform/rsa/encrypt/' + account,
    })
}

export const enPassword = data => {
    return request({
        method: "get",
        url: '/api/platform/rsa/password',
        params: data,
    })
}

